#ifndef TWODMAP_H
#define TWODMAP_H

#include "enums.h"
#include "textdisplay.h"
#include "Vector2.h"
#include "Sprite.h"
#include "Animation.h"

class TwoDMap
{
    public:
        TwoDMap();
        ~TwoDMap();
        void Draw();
        void Update(int Delta);
        void SetScreenDrawArea(RectangleWH newArea);
    private:
        int tileWidth;
        int tileHeight;
        int tileRows;
        int tileColumns;
        Image *pSpriteSheet;
        Sprite *pFloor;
        Vector2 TileScreenPosition(Vector2 tilePosition);
        int defaultTile;
        void PopulateMap();
        vector<int> mapData;
        int CoordsToIndex(Vector2 coords);
        Vector2 MapDrawOrigin();
        Vector2 mapSize;
        Vector2 PositionOnFullMap(Vector2 coords, Vector2 offset);
        bool LocationIsOnMap(Vector2 coords);
        RectangleWH DrawAreaInTiles();
        RectangleWH screenDrawArea;
        RectangleWH GetScreenDrawArea();
        RectangleWH mapCoordsToDraw;
        Vector2 DrawAreaPositionOfTile(Vector2 tileCoords);
        Vector2 DrawAreaPositionOfTileInTiles(Vector2 tileCoords);



};




#endif
